#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include "qsqlquerymodel.h"
#include "QStringListModel"

namespace Ui {
    class Widget;
}

class Widget : public QWidget {
    Q_OBJECT
public:
    Widget(QWidget *parent = 0);
    ~Widget();
    QSqlQueryModel *sqlmod;
    QStringListModel *table_mod;
    QStringListModel *view_mod;
    QStringListModel *field_mod;

protected:
    void changeEvent(QEvent *e);

private:
    Ui::Widget *ui;
public slots:
    bool ExecSQL();
    void tableChanged();
    void RefetchTable();
};

#endif // WIDGET_H
